import Map from "ol/Map.js"; //地图
import View from "ol/View.js"; //视图
import TileLayer from "ol/layer/Tile.js"; //瓦片图层
import OSM from "ol/source/OSM.js"; //OSM
import XYZ from "ol/source/XYZ";
import { get as getProjection } from "ol/proj";
import { transform } from "ol/proj";
import { ScaleLine, defaults as defaultControls } from "ol/control";
import VectorSource from "ol/source/Vector";
import VectorLayer from "ol/layer/Vector";
import { fromLonLat } from "ol/proj";
import { Feature } from "ol";
import Fill from "ol/style/Fill";
import Circle from "ol/style/Circle";
import Stroke from "ol/style/Stroke";
import Style from "ol/style/Style";
import { LineString, MultiLineString, Point, Polygon, MultiPolygon } from "ol/geom";

/**
 * @description: 用于存放ol库里的方法
 * @return {*}
 * @Author: yx
 */
class Ol {
  constructor() {
    this.Map = Map;
    this.View = View;
    this.TileLayer = TileLayer;
    this.OSM = OSM;
    this.XYZ = XYZ;
    this.ScaleLine = ScaleLine;
    this.Point = Point;
    this.VectorLayer = VectorLayer;
    this.VectorSource = VectorSource;
    this.Feature = Feature;
    this.Fill = Fill;
    this.Circle = Circle;
    this.Stroke = Stroke;
    this.Style = Style;
    this.MultiPolygon = MultiPolygon;
    this.Polygon = Polygon;
    this.LineString = LineString;
    this.MultiLineString = MultiLineString;
    this.fromLonLat = fromLonLat;
    this.getProjection = getProjection;
    this.transform = transform;
    this.defaultControls = defaultControls;
  }
}

export default Ol;
